#include "syscall.h"

void client2_main()
{
	int lock=0;
	WriteFormat("----------Test Case II----------\n",34,0,0);
	WriteFormat("2-1 Distributed Lock Function in Multi Client \n",48,0,0);
	WriteFormat("    Try to Acquire New Lock %d \n",33,&lock,1);
	WaitInput();
	RemoteAcquireLock(lock);	
	WriteFormat("    Try to Release Lock %d \n",29,&lock,1);
	WaitInput();
	RemoteReleaseLock(lock);
	WriteFormat("    Try to Reacquire this Lock \n",33,0,0);
	WaitInput();
	RemoteAcquireLock(lock);
	WriteFormat("    Re-Acquired Lock %d \n",26,&lock,1);
	RemoteReleaseLock(lock);
	RemoteDestroyLock(lock);
	WriteFormat("------------test end-----------\n",33,0,0);
	return;
}

int main()
{
	client2_main();
}
